#
# Copyright (C) 2018 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

DEVICE_PATH := device/qiku/QK1707

# Inherit from sdm660-common
$(call inherit-product, device/qiku/sdm660-common/sdm660.mk)

# Vendor blobs
$(call inherit-product-if-exists, vendor/qiku/QK1707/QK1707-vendor.mk)

# Inherit properties
$(call inherit-product, $(DEVICE_PATH)/properties.mk)

# Overlays
#DEVICE_PACKAGE_OVERLAYS += $(DEVICE_PATH)/overlay

#PRODUCT_ENFORCE_RRO_TARGETS := \
#    framework-res

PRODUCT_PACKAGES += \
    FrameworksOverlayN6

# AAPT
#PRODUCT_AAPT_CONFIG := normal
#PRODUCT_AAPT_PREBUILT_DPI := xxhdpi xhdpi hdpi
# Haters gonna hate..
PRODUCT_CHARACTERISTICS := nosdcard

# Audio
PRODUCT_COPY_FILES += \
    $(DEVICE_PATH)/configs/audio/audio_platform_info_intcodec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_intcodec.xml \
    $(DEVICE_PATH)/configs/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
    $(DEVICE_PATH)/configs/audio/mixer_paths_mtp.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_mtp.xml

#Camera
ifdef BOARD_QIKU_CAMERA_HAL
PRODUCT_PACKAGES += \
    camera.sdm660 \
    libmm-qcamera
endif

# Fingerprint Gestures
PRODUCT_COPY_FILES += \
    $(DEVICE_PATH)/keylayout/qkfingerprint.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/qkfingerprint.kl \
    $(DEVICE_PATH)/keylayout/gpio-keys.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/gpio-keys.kl \

# FM
BOARD_HAVE_QCOM_FM := false

# HW crypto
PRODUCT_PACKAGES += \
    vendor.qti.hardware.cryptfshw@1.0-service-qti.qsee

# Init
PRODUCT_PACKAGES += \
    init.fingerprint.rc \
    init.logcatd.rc \
    init.qiku.rc \
    init.qiku2.rc \
    init.qiku.usb.rc \
    init.subsys.rc \
    boot_backup_log.sh

# Soong
PRODUCT_SOONG_NAMESPACES += \
    $(DEVICE_PATH)

# Wifi
PRODUCT_PACKAGES += \
    N6WifiOverlay
